From 157ea3fcaf09d1ebe823c4d93a168158e8579b2a Mon Sep 17 00:00:00 2001 From: Rene Engelhard Date: Fri, 15 Dec 2023 23:45:04 +0100 Subject: [PATCH] [PATCH] fix system-abseil build even with 2022 version actually it seems it was a internal abseil header from pdfium vs. system header mismatch. Include proper absl/container/inlined_vector.h if using system-abseil. While at it we can also just use pkg-config, no idea why I did it without back then. Also gets the advantage that it knows that the libs needed for absl_inlined_vector is actually -labsl_throw_delegate -labsl_raw_logging_internal -labsl_log_severity This effectively reverts e89723103313ec4366ee58144c47d7a5c16bf838 Change-Id: Ide4f79860b4e0673c5c6587d503058bdd2930744 Gbp-Pq: Name fix-system-abseil-build.diff --- configure.ac | Bin 553521 -> 552985 bytes external/pdfium/Library_pdfium.mk | 5 +++++ external/pdfium/UnpackedTarball_pdfium.mk | 2 ++ external/pdfium/system-abseil.diff | 15 +++++++++++++++ 4 files changed, 22 insertions(+) create mode 100644 external/pdfium/system-abseil.diff diff --git a/configure.ac b/configure.ac index 7d5b92769ea5854af113419864611ecf93ce0da0..a551d70a6dbe7efb6e76ef8e976cb6a672e5bc5e 100644 GIT binary patch delta 103 zcmV-t0GR)=DK|)hS zNlYvtm#?@67y%%c@wo;U6(C_^b8KH}Zft38Wn^D=Wn*-2av+z1+XfStusH@2hb_7W Jw=KE{1h_>NBohDt delta 368 zcmbRFKyl*}#fBEf7N!>F7M2#)Eo>9EPY-y?#xY%cGb`tGfqSg%3W-U@Ir=4)1*ygQ zNr@@(`2{7J`FV*s@rlXFsl~;58PhkeW0jg-u!>cP6{s{dbGm^Jn+ig|JevNp#G=f^ zyb{9N`M@^EW3e+gk@qiV>P)Hpuo{7*wxb~-pA7^*j7n52W+vFZVnCu Ql-fUTXWRa9JG;gX04th;?*IS* diff --git a/external/pdfium/Library_pdfium.mk b/external/pdfium/Library_pdfium.mk index fc0903d873d..85f9d953b75 100644 --- a/external/pdfium/Library_pdfium.mk +++ b/external/pdfium/Library_pdfium.mk @@ -40,6 +40,11 @@ $(eval $(call gb_Library_add_defs,pdfium,\ -DUSE_SYSTEM_LIBOPENJPEG2 \ )) endif +ifeq ($(SYSTEM_ABSEIL),TRUE) +$(eval $(call gb_Library_add_defs,pdfium,\ + -DUSE_SYSTEM_ABSEIL \ +)) +endif $(eval $(call gb_Library_set_generated_cxx_suffix,pdfium,cpp)) diff --git a/external/pdfium/UnpackedTarball_pdfium.mk b/external/pdfium/UnpackedTarball_pdfium.mk index 924bbe23a8b..f8d95d2785c 100644 --- a/external/pdfium/UnpackedTarball_pdfium.mk +++ b/external/pdfium/UnpackedTarball_pdfium.mk @@ -16,6 +16,8 @@ pdfium_patches += c++20-comparison.patch pdfium_patches += constexpr-template.patch +pdfium_patches += system-abseil.diff + $(eval $(call gb_UnpackedTarball_UnpackedTarball,pdfium)) $(eval $(call gb_UnpackedTarball_set_tarball,pdfium,$(PDFIUM_TARBALL))) diff --git a/external/pdfium/system-abseil.diff b/external/pdfium/system-abseil.diff new file mode 100644 index 00000000000..841bc8ce946 --- /dev/null +++ b/external/pdfium/system-abseil.diff @@ -0,0 +1,15 @@ +--- core/fpdfapi/page/cpdf_sampledfunc.cpp 2023-12-15 23:27:10.955659091 +0100 ++++ core/fpdfapi/page/cpdf_sampledfunc.cpp 2023-12-15 23:27:43.420136476 +0100 +@@ -16,8 +16,11 @@ + #include "core/fxcrt/cfx_bitstream.h" + #include "core/fxcrt/fx_memory_wrappers.h" + #include "core/fxcrt/fx_safe_types.h" ++#ifdef USE_SYSTEM_ABSEIL ++#include ++#else + #include "third_party/abseil-cpp/absl/container/inlined_vector.h" +- ++#endif + namespace { + + // See PDF Reference 1.7, page 170, table 3.36. -- 2.30.2